#!/usr/bin/python

from SimpleXMLRPCServer import SimpleXMLRPCServer

global val
val = 0

def testinc(a):
    global val
    val += a
    print "value: %i" % val
    return(val)

server = SimpleXMLRPCServer(("localhost", 8000))
server.register_introspection_functions()
server.register_function(testinc)
server.serve_forever()
